<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="css/layui.css"  media="all">
</head>
<body>
<div>
    主页
    <div id="t1"></div>
</div>
<form method="post" action="/upload" enctype="multipart/form-data">
    <input type="file" name="file">111<br>
    <input type="submit" value="提交">
</form>

<form class="layui-form" action="user/info" method="post" >
    <div class="layui-form-item">
        <label class="layui-form-label">姓名</label>
        <div class="layui-input-block">
            <input type="text" name="name" lay-verify="title" autocomplete="off" placeholder="请输入标题" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">年龄</label>
        <div class="layui-input-block">
            <input type="text" name="age" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>



<script src="axios.js" ></script>
<script>
    window.onload=function() {
        axios.get('/index')
            .then(function (response) {
                // if (success()){
                //     document.getElementById("t1").innerText(response.data);
                // }
                console.log(response.data);

            })
            .catch(function (error) {
                console.log(error);
            });
    }
</script>

<script src="layui.all.js"></script>
</body>
</html>